<template>
  <ion-page>
    <ion-header>
      <ion-toolbar color="light" class="pub-hearder">
        <ion-buttons slot="start">
          <ion-back-button text=""></ion-back-button>
        </ion-buttons>
        <ion-title>确认订单</ion-title>
      </ion-toolbar>
    </ion-header>
    <ion-content>
        <div class="desc">
            <div class="zhinfo">测试帐号<label>13123456789</label> </div>
            <div class="address">地址</div>
            <div class="border"></div>
            <ion-icon class="chevronForwardOutline arrow-right" :icon="chevronForwardOutline"></ion-icon>
        </div>
        <div class="info">
            <div class="title">订单</div>
            <div class="detail">
                <div class="img">
                    <img mode="widthFix" src="@/assets/images/logo.png"/>
                </div>
                <div class="spdesc">
                    <div>
                        <div>《置身事内·中国政府与经济发展》兰小欢兰小欢兰小欢兰小欢</div>
                        <div class="dw"></div>
                        <!-- <div class="dw">500ml</div> -->
                    </div>
                    <div class="price">
                        <div>¥58.8</div>
                        <div class="num"></div>
                        <!-- <div class="num">x2</div> -->
                    </div>
                </div>
            </div>
            <div class="jg yf">运费：¥0.00</div>
            <div class="jg">订单总价：¥117.16</div>
        </div>
        <div class="info">
            <ion-row gutter="0">
                <ion-col size="6">
                    <div class="key">支付总金额</div>
                </ion-col>
                <ion-col size="6">
                    <div text-align="right" class="key price zje">¥234.32</div>
                </ion-col>
            </ion-row>
            <ion-row gutter="0">
                <ion-col size="6">
                    <div class="key">商品总金额</div>
                </ion-col>
                <ion-col size="6">
                    <div text-align="right" class="key price">¥234.32</div>
                </ion-col>
            </ion-row>
            <ion-row gutter="0">
                <ion-col size="6">
                    <div class="key noborder">总运费</div>
                </ion-col>
                <ion-col size="6">
                    <div text-align="right" class="key price noborder">¥0</div>
                </ion-col>
            </ion-row>
        </div>
        <div class="info">
            <div class="title">选择支付方式</div>
            <ion-row gutter="0">
                <ion-col size="6">
                    <div class="key noborder">
                        <ion-icon :icon="logoWechat" style="margin-right: 10px; position: relative; top: 3px;color:#4EC244;font-size: 24px;"></ion-icon>
                        微信支付</div
                    >
                </ion-col>
                <ion-col size="6">
                    <div text-align="right" class="key price noborder"
                        >
                        <ion-icon :icon="checkmarkCircleOutline" style="position: relative; top: 3px;color:#CA3032;font-size: 24px;"></ion-icon>
                        <!-- <u-icon
                            name="checkmark-circle-fill"
                            size="48"
                            style="position: relative; top: 3px;color:#CA3032"
                        ></u-icon -->
                    </div>
                </ion-col>
            </ion-row>
        </div>
    </ion-content>
    <ion-footer>
      <ion-row>
        <ion-col>
            <div style="height: 42px; line-height:42px">
                总计:
                <label :style="{ color: '#ca3032' }"
                    >¥234.32</label
                >
            </div>
        </ion-col>
        <ion-col>
            <div style="padding: 0rpx 10rpx; line-height: 42px">
                <div
                    @click="gopages()"
                    style="
                        height: 42px;
                        color: #fff;
                        text-align: center;
                        width: 50%;
                        float: right;
                    "
                    :style="{ background: '#ca3032' }"
                    >去付款</div
                >
            </div>
        </ion-col>
      </ion-row>
    </ion-footer>
  </ion-page>
</template>

<script lang="ts">
import { IonPage, IonContent, IonHeader, IonToolbar, IonButtons, IonBackButton, IonTitle, IonRow, IonCol, IonFooter } from '@ionic/vue';
import { chevronForwardOutline, checkmarkCircleOutline, logoWechat } from 'ionicons/icons';
import { reactive, toRefs } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { PublicService } from '@/utils/public';
const publicService = new PublicService();
export default {
  name: 'login-page',
  components: {
    IonPage, IonContent, IonHeader, IonToolbar, IonButtons, IonBackButton, IonTitle, IonRow, IonCol, IonFooter
  },
  setup() {
    const router = useRouter();
    const route = useRoute();
    let t: any;
    const state = reactive({
        url: route.query.url,
        fileList: [
            {
                title: '考音乐学院到底要不要跑课',
                size: 10,
                downNum: 2222,
                isMian: 1
            },
            {
                title: '考音乐学院到底要不要跑课',
                size: 10,
                downNum: 2222,
                isMian: 0
            },
            {
                title: '考音乐学院到底要不要跑课',
                size: 10,
                downNum: 2222,
                isMian: 1
            }
        ],
    })

    function gopages(){
      router.push(
        {
          path: '/paymentresults',
          query: {
            ...route.query
          }
        }
      )
    }

   


    return {
      ...toRefs(state),
      chevronForwardOutline,
      checkmarkCircleOutline,
      logoWechat,
      gopages
    }
  }
}
</script>
<style lang="scss" scoped>
ion-content{
    --background: #f4f4f4 !important;
    --padding-top: 10px;
    --padding-bottom: 10px;
    --padding-end: 10px;
    --padding-start: 10px;
    .desc {
        text-align: left;
        padding: 10px;
        background: #fff;
        padding-bottom: 0px;
        position: relative;
        .zhinfo {
            font-weight: 800;
            font-size: 16px;
            color: #242424;
            label {
                font-size: 14px;
                color: #242425;
                margin-left: 5px;
            }
        }
        .address {
            font-size: 14px;
            color: #242425;
            margin-bottom: 10px;
            margin-top: 7px;
        }
        .border {
            background: url('../../assets/images/border.png');
            height: 3px;
            background-size: contain;
            background-position: -8px;
            background-repeat: repeat-x;
            position: relative;
            top: 7px;
        }
        .arrow-right {
            position: absolute;
            right: 7px;
            top: 25px;
        }
    }

    .info {
        padding: 0px 10px;
        background: #fff;
        margin-top: 15px;
        font-size: 12px;
        padding-bottom: 5px;
        .title {
            color: #666666;
            padding: 10px 0px;
            border-bottom: 1px solid #eaeaea;
        }
        .detail {
            display: flex;
            padding: 10px 0px;
            .img {
                width: 60px;
            }
            .spdesc {
                flex: 1;
                display: flex;
                padding-left: 10px;
                view {
                    flex: 1;
                    font-weight: 400;
                    font-size: 14px;
                    color: #242425;
                    line-height: 22px;
                }
                .price {
                    max-width: 40px;
                    text-align: right;
                    font-size: 14px;
                    color: #242424;
                    min-width: 40px;
                    .num {
                        font-weight: 400;
                        font-size: 12px;
                        color: #999999;
                    }
                }
                .dw {
                    font-weight: 400;
                    font-size: 12px;
                    color: #999999;
                }
            }
        }
        .jg {
            font-weight: 400;
            font-size: 14px;
            color: #242424;
            text-align: right;
            margin-bottom: 10px;
        }
        .yf {
            font-weight: 400;
            font-size: 12px;
            color: #666666;
            text-align: right;
        }
        .key {
            height: 42px;
            border-bottom: 1px solid #eaeaea;
            line-height: 42px;
            font-weight: 400;
            font-size: 14px;
            color: #242425;
        }
        .price {
            text-align: right;
            font-weight: 400;
            font-size: 14px;
            color: #242425;
        }
        .zje {
            color: #ca3032;
        }
        .noborder {
            border: none;
        }
    }
} 

</style>